package com.example.cloudmusic

import android.app.Application
import com.example.cm_player.manager.PlayerManager
import com.example.cm_utils.ContextHelper
import java.lang.ref.WeakReference

class CloudMusicApplication:Application() {

    override fun onCreate() {
        super.onCreate()
        ContextHelper.context = WeakReference(this.applicationContext)
        PlayerManager.getInstance().createNewPlayer()
    }


    fun releaseResources() {
        PlayerManager.getInstance().release()
    }
}